import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main
from util import *
from dungeon import makeFloor, Room, TemplateRoom
import dungeon

template = \
"""
+-+
|  
o  
   
   
   
o  
|  
+-+
"""[1:]

legend = {
     '+':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('engraved wooden wall', 10, parole.map.AsciiTile('+',
                colors['Sienna'], bg_rgb=colors['Peru']),
                blockMove=True, massNoun=False, startsVowel=True, blockLOS=True),
            clearFirst=False),
    
     '-':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('engraved wooden wall', 10, parole.map.AsciiTile('-',
                colors['Sienna'], bg_rgb=colors['Peru']),
                blockMove=True, massNoun=False, startsVowel=True, blockLOS=True),
            clearFirst=False),
    
     '|':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('engraved wooden wall', 10, parole.map.AsciiTile('|',
                colors['Sienna'], bg_rgb=colors['Peru']),
                blockMove=True, massNoun=False, startsVowel=True, blockLOS=True),
            clearFirst=False),
    
     'o':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('wooden post, engraved "ELEOS" in large letters', 
                10, parole.map.AsciiTile('o',
                colors['Sienna'], bg_rgb=colors['Peru']),
                blockMove=True, massNoun=False, startsVowel=False),
            clearFirst=False),
    
}

floorColor1 = colors['Olive']
floorColor2 = colors['DarkGreen']
floorName = None
mixture = 0.3

diggable = None # means perimeter

class Gate(TemplateRoom):
    def __init__(self, pos):
        TemplateRoom.__init__(self, template, legend, diggable, pos,
                floorColor1, floorColor2, mixture, floorName)


roomClass = Gate




